import { SearchBar, WhiteSpace, WingBlank } from 'antd-mobile';
import React from 'react'

class Search extends React.Component {
    state = {
        value: '',
    };
    componentDidMount() {
    }
    onChange = (value) => {
        this.setState({ value });
    };
    clear = () => {
        this.setState({ value: '' });
    };
    handleClick = () => {
        this.manualFocusInst.focus();
    }
    render() {
        return (
        <div>
            <WhiteSpace />
            <SearchBar
                value={this.state.value}
                placeholder="有哪些乐器演奏好听到令人窒息"
                onSubmit={value => console.log(value, 'onSubmit')}
                onClear={value => console.log(value, 'onClear')}
                onFocus={() => console.log('onFocus')}
                onBlur={() => console.log('onBlur')}
                onCancel={() => console.log('onCancel')}
                onChange={this.onChange}
            />
        </div>);
    }
}

export default Search